package world.snowcrystal.event;

import org.springframework.security.authentication.event.AbstractAuthenticationEvent;
import org.springframework.security.core.Authentication;

import java.util.HashMap;
import java.util.Map;


/**
 * 用于保存用户登出时的上下文信息
 * @since 1.0
 * @author tianqing
 */
public class LogoutSuccessWithContextEvent extends AbstractAuthenticationEvent {

    private static final String FINGERPRINT = "fingerprint";

    private Map<String,Object> context = new HashMap<String,Object>();

    public LogoutSuccessWithContextEvent(Authentication authentication) {
        super(authentication);
    }

    public String getFingerprint(){
        return (String) context.get(FINGERPRINT);
    }
    public void setFingerprint(String fingerprint){
        context.put(FINGERPRINT, fingerprint);
    }


}
